package javaCode;

/**
 * Created by lxy_920912 on 02/05/2017.
 */
public class LeetCode344 {
    public String reverseString(String s) {
        char[] sArr = s.toCharArray();
        int i = 0;
        int j = sArr.length-1;
        while(i < j){
            char c = sArr[i];
            sArr[i] = sArr[j];
            sArr[j] = c;
            i++;
            j--;
        }
        return new String(sArr);
    }
}
